package com.wfk.service.impl;

import com.wfk.entity.OpinionInfos;
import com.wfk.mapper.OpinionInfosMapper;
import com.wfk.service.IOpinionInfosService;
import com.wfk.utils.BasePage;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 用户意见表 服务实现类
 * </p>
 *
 * @since 2019-01-13
 */
@Service
public class OpinionInfosServiceImpl extends ServiceImpl<OpinionInfosMapper, OpinionInfos> implements IOpinionInfosService {

	@Override
	public BasePage<OpinionInfos> getList(OpinionInfos opinionInfos, BasePage<OpinionInfos> page) {
		QueryWrapper<OpinionInfos> queryWrapper = new QueryWrapper<OpinionInfos>();
		queryWrapper.orderByDesc("id");
		if(page.isPage()) {
			super.page(page, queryWrapper);
		}else {
			page.setRecords(super.list(queryWrapper));
		}
		return page;
	}

}
